function GenericAjax() {
	this.xmlHttp = null;
	
	// initialize the ajax object
	/* Create a new XMLHttpRequest object to talk to the Web server */
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	try {
	  	this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	  try {
	    	this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	  } catch (e2) {
	    	this.xmlHttp = false;
	  }
	}
	@end @*/
	
	if (!this.xmlHttp && typeof XMLHttpRequest != 'undefined') {
	 	this.xmlHttp = new XMLHttpRequest();
	}
}

/** member methods **/

GenericAjax.prototype.sendRequest = function(url, handler) {
	this.xmlHttp.open("GET",  url, true);
	this.xmlHttp.onreadystatechange = handler;
	this.xmlHttp.send(null);
}

GenericAjax.prototype.send = function(url, handler) {

    this.sendRequest(this.addTimeStamp(url), handler);
}

GenericAjax.prototype.getReadyState = function() {
	return this.xmlHttp.readyState;
}

GenericAjax.prototype.getStatus = function() {
	return this.xmlHttp.status;
}

GenericAjax.prototype.getResponseText = function() {
	return this.xmlHttp.responseText;
}

GenericAjax.prototype.getResponseXML = function() {
	return this.xmlHttp.responseXML;
}

GenericAjax.prototype.isReady = function() {
    return (this.getReadyState() === 4);
}

GenericAjax.prototype.addTimeStamp = function(url) {

    if (url.indexOf("?") === -1) {
        url += "?v="+this.getTimeStamp();
    }
    else {
        url += "&v="+this.getTimeStamp();
    }
    
    return url;
}

GenericAjax.prototype.getTimeStamp = function() {
    var now = new Date();
	var stamp = now.getYear()+'.'+now.getMonth()+'.'+now.getDay()+'.'+now.getHours()+'.'+now.getMinutes()+'.'+now.getSeconds();

    return stamp;
}


